package org.gitman.filmBase.model.database;

import java.util.Collection;

import org.apache.derby.jdbc.EmbeddedDriver;
import org.gitman.filmBase.model.Film;
import org.gitman.filmBase.model.Person;
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;

public class DerbyFacade implements IFacade {

	private static DerbyFacade facade;
	private Configuration configuration;	
	private Session session;
	
	private DerbyFacade(){
		configuration = new Configuration().configure("org/gitman/filmBase/model/hibernate.cfg.xml");
		session = configuration.buildSessionFactory().getCurrentSession();
	}
	
	public static IFacade getInstance(){
		if(facade == null){
			facade = new DerbyFacade();
		}
		return facade;
	}

	
	
	@Override
	public Collection<Film> getAllFilms() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Collection<Person> getAllPersons() {
		// TODO Auto-generated method stub
		return null;
	}

	
}
